import {ParamsType} from "@ant-design/pro-components";
import {addData, deleteById, get, pageData, post, updateById} from "@/services/base-request";

export const pageStudentAPI = (params: ParamsType) => {
  return pageData("/student", params)
}

export const addStudentAPI = (data: API.IStudent) => {
  return addData("/student", data)
}

export const updateStudentAPI = (data: API.IStudent) => {
  return updateById("/student", data)
}

export const deleteStudentAPI = (id: string | number) => {
  return deleteById("/student", id)
}


export const pageByLessonAPI = (params: ParamsType) => {
  return get("/student/pageByLesson", params)
}

export const studentArriveLessonApi = (data: { lessonId: string, studentId: string }) => {
  return post("/student/arrive", data)
}
